const mongoose = require('../db/mongoose');

const userSchema = new mongoose.Schema({
    id: String,
    username: { // 用户名
        type: String,
        required: true
    },
    password: {
        type: String,
        require: true
    },
    email: {
        type: String,
        require: true
    },
    age: {
        type: Number,
        require: true
    }
})

userSchema.index({ id: 1 });
module.exports = mongoose.model('User', userSchema)